<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 闭包: 将函数作为另外一个函数的返回值
        function fn1() {
            function fn2() {
                console.log('fn2');
            }
            return fn2:
        }
    </script>
</body>

</html>